Skip to content

[MLOB-1009] Auto-Instrument LLM Observability#500

Merged
sabrenner merged 4 commits into
mainfrom
sabrenner/llmobs-force-flush
Jul 1, 2024
Merged

[MLOB-1009] Auto-Instrument LLM Observability#500
sabrenner merged 4 commits into
mainfrom
sabrenner/llmobs-force-flush

Conversation

@sabrenner
Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds auto-instrumentation to the serverless layer for LLM Observability. Now, in order to enable LLM Observability for auto-instrumented integrations (OpenAI, LangChain, Bedrock, and Anthropic), set DD_LLMOBS_ENABLED=1, along with:

DD_LLMOBS_ML_APP=<YOUR_ML_APP>
DD_API_KEY=<YOUR_DATADOG_API_KEY>
DD_SITE=<YOUR_DATADOG_SITE>

LLM Observability documentation is available for full instrumentation instructions.

Motivation

Enable easy onboarding and auto-instrumentation experience with LLM Observability in a serverless environment.

Testing Guidelines

Built the layer and tested against a lambda handler. Verified that

  1. LLM traces were submitted per invocation of the function
  2. APM traces were still being sent as well

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

@sabrenner sabrenner changed the title [MLOB-1099] Auto-Instrument LLM Observability [MLOB-1009] Auto-Instrument LLM Observability Jul 1, 2024
@sabrenner sabrenner marked this pull request as ready for review July 1, 2024 15:29
@sabrenner sabrenner requested a review from a team as a code owner July 1, 2024 15:29
Comment thread datadog_lambda/wrapper.py Outdated
Copy link
Copy Markdown
Contributor

@purple4reina purple4reina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move location of flush call

Copy link
Copy Markdown
Contributor

@purple4reina purple4reina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants